package com.kelaite.procurement.repository;

import java.util.Date;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.kelaite.procurement.entity.TPurchaseOrderExecutionItems;

public interface PurchaseOrderExecutionItemsRepository extends JpaRepository<TPurchaseOrderExecutionItems, Long>{
	
	@Modifying
	@Query(value = "update t_purchase_order_execution_items o set o.quantityConfirmed =:quantityConfirmed, o.gmtUpdateTime =:gmtUpdateTime, o.updatedBy =:updatedBy where o.id =:id")
	public int updatePurchaseOrderExecutionItems(@Param("id") Long id,
			@Param("quantityConfirmed") Double quantityConfirmed,
			@Param("gmtUpdateTime") Date gmtUpdateTime,
			@Param("updatedBy") String updatedBy);
}
